//
//  RadioTableViewCell.m
//  项目
//
//  Created by 杨世博 on 15-1-4.
//  Copyright (c) 2015年 张诗雨. All rights reserved.
//

#import "RadioTableViewCell.h"
#import "WebColor.h"
@implementation RadioTableViewCell
- (void)dealloc
{
    [_covringImage release];
    [_listenImage release];
    [_listenNumLabel release];
    [_soundNew release];
    [_titleLabel release];
    [_uNameLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.covringImage = [[UIImageView alloc] init];
        [_covringImage setBackgroundColor:[WebColor tan]];
        [self.contentView addSubview:_covringImage];
        [_covringImage release];
        
        self.listenImage = [[UIImageView alloc] init];
        [_listenImage setImage:[UIImage imageNamed:@"listenNum.png"]];
        [self.covringImage addSubview:_listenImage];
        [_listenImage release];
        
        self.listenNumLabel = [[UILabel alloc]init];
        [_listenNumLabel setFont:[UIFont systemFontOfSize:15.0f]];
        [_listenNumLabel setTextColor:[WebColor white]];
        [self.covringImage addSubview:_listenNumLabel];
        [_listenNumLabel release];
        
        self.uNameLabel = [[UILabel alloc] init];
        [_uNameLabel setFont:[UIFont systemFontOfSize:15.0f]];
        [_uNameLabel setTextColor:[WebColor white]];
        [self.covringImage addSubview:_uNameLabel];
        [_uNameLabel release];
        
        self.titleLabel = [[UILabel alloc] init];
        [_titleLabel setFont:[UIFont systemFontOfSize:15.0f]];
        [_titleLabel setTextColor:[WebColor white]];
        [self.covringImage addSubview:_titleLabel];
        [_titleLabel release];
        
        self.soundNew = [[UIImageView alloc] init];
        [self.covringImage addSubview:_soundNew];
        [_soundNew release];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.covringImage setFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    [self.listenImage setFrame:CGRectMake(self.frame.size.width / 4 * 3, 5, 15, 15)];
    [self.listenNumLabel setFrame:CGRectMake(self.frame.size.width * 3 / 4 + 15, 5, self.frame.size.width / 4 - 15, 15)];
    [self.soundNew setFrame:CGRectMake(0, self.frame.size.height / 3, 35, 35)];
    [self.uNameLabel setFrame:CGRectMake(10, self.frame.size.height - 20, self.frame.size.width / 3 - 10, 20)];
    [self.titleLabel setFrame:CGRectMake(self.frame.size.width / 3 - 10, self.frame.size.height - 20, self.frame.size.width * 2 / 3 - 20, 20)];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
